package com.ruoyi.general.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.general.mapper.AlarmMapper;
import com.ruoyi.general.domain.Alarm;
import com.ruoyi.general.service.IAlarmService;

/**
 * 告警Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
@Service
public class AlarmServiceImpl implements IAlarmService 
{
    @Autowired
    private AlarmMapper alarmMapper;

    /**
     * 查询告警
     * 
     * @param alarmId 告警主键
     * @return 告警
     */
    @Override
    public Alarm selectAlarmByAlarmId(Long alarmId)
    {
        return alarmMapper.selectAlarmByAlarmId(alarmId);
    }

    /**
     * 查询告警列表
     * 
     * @param alarm 告警
     * @return 告警
     */
    @Override
    public List<Alarm> selectAlarmList(Alarm alarm)
    {
        return alarmMapper.selectAlarmList(alarm);
    }

    /**
     * 新增告警
     * 
     * @param alarm 告警
     * @return 结果
     */
    @Override
    public int insertAlarm(Alarm alarm)
    {
        return alarmMapper.insertAlarm(alarm);
    }

    /**
     * 修改告警
     * 
     * @param alarm 告警
     * @return 结果
     */
    @Override
    public int updateAlarm(Alarm alarm)
    {
        return alarmMapper.updateAlarm(alarm);
    }

    /**
     * 批量删除告警
     * 
     * @param alarmIds 需要删除的告警主键
     * @return 结果
     */
    @Override
    public int deleteAlarmByAlarmIds(Long[] alarmIds)
    {
        return alarmMapper.deleteAlarmByAlarmIds(alarmIds);
    }

    /**
     * 删除告警信息
     * 
     * @param alarmId 告警主键
     * @return 结果
     */
    @Override
    public int deleteAlarmByAlarmId(Long alarmId)
    {
        return alarmMapper.deleteAlarmByAlarmId(alarmId);
    }
}
